package com.by.sbdemoby.handler;

import org.springframework.web.bind.annotation.ExceptionHandler;

/**
 * @auth wzy
 * @date 2023/12/9 10:56
 */
//@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(RuntimeException.class)
    public String handle(RuntimeException e){
        return "出现异常:"+e.getMessage();
    }
}
